import Vue from 'vue'
import Router from 'vue-router'
const UserCenter = resolve => require(['@/components/UserCenter/UserCenter'], resolve)
const Authentication = resolve => require(['@/components/Authentication/Authentication'], resolve)
const Foget = resolve => require(['@/components/Foget/Foget'], resolve)
const CompanyRes = resolve => require(['@/components/CompanyRes/CompanyRes'], resolve)
const Home = resolve => require(['@/components/Home/Home'], resolve)
const Signed = resolve => require(['@/components/Signed/Signed'], resolve)
const ResetEmail = resolve => require(['@/components/ResetEmail/ResetEmail'], resolve)
const ResetPhone = resolve => require(['@/components/ResetPhone/ResetPhone'], resolve)
const ResetPassword = resolve => require(['@/components/ResetPassword/ResetPassword'], resolve)
const Msg = resolve => require(['@/components/Msg/Msg'], resolve)
Vue.use(Router)

const router = new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      components: {
        default: Home
      },
      name: '我要签约'
    },
    {
      path: '/UserCenter',
      components: {
        default: UserCenter
      },
      name: '个人中心'
    },
    {
      path: '/authentication',
      components: {
        default: Authentication
      },
      name: '个人实名认证'
    },
    {
      path: '/foget',
      components: {
        default: Foget
      },
      name: '找回密码'
    },
    {
      path: '/companyRes',
      components: {
        default: CompanyRes
      },
      name: '企业实名认证'
    },
    {
      path: '/signed',
      components: {
        default: Signed
      },
      name: '已签署的合同'
    },
    {
      path: '/resetEmail',
      components: {
        default: ResetEmail
      },
      name: '修改邮箱'
    },
    {
      path: '/resetPassword',
      components: {
        default: ResetPassword
      },
      name: '修改密码'
    },
    {
      path: '/resetPhone',
      components: {
        default: ResetPhone
      },
      name: '修改手机'
    },
    {
      path: '/msg',
      components: {
        default: Msg
      },
      name: '签证完成'
    }
  ]
})
export default router
